package com.example.spareparts.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import com.example.spareparts.entity.InventoryAlerts;
import com.example.spareparts.repository.InventoryAlertsRepository;

@Service
public class InventoryAlertsService {
    @Autowired
    private InventoryAlertsRepository inventoryAlertsRepository;
    public List<InventoryAlerts> findAllInventoryAlerts(){
        return inventoryAlertsRepository.findAllInventoryAlerts();
    }
    public void insertInventoryAlerts(InventoryAlerts inventoryAlerts){
        inventoryAlertsRepository.insertInventoryAlerts(inventoryAlerts);
    }
    public void updateInventoryAlerts(InventoryAlerts inventoryAlerts){
        inventoryAlertsRepository.updateInventoryAlerts(inventoryAlerts);
    }
    public void deleteInventoryAlerts(Long alertid){
        inventoryAlertsRepository.deleteInventoryAlerts(alertid);
    }
    public InventoryAlerts findInventoryAlertsById(Long alertid){
        return inventoryAlertsRepository.findInventoryAlertsById(alertid);
    }
    public List<InventoryAlerts> findInventoryAlertsBySparePartId(Long sparepartid){
        return inventoryAlertsRepository.findInventoryAlertsBySparePartId(sparepartid);
    }
}

